#include<iostream>
using namespace std;
int exam4_28_2()
{
	int x, a, b, c;
	for(a=1;a<=9;a++)
		for (b = 0; b <= 9; b++)
			for (c = 0; c <= 9; c++)
			{
				x = a * 100 + b * 10 + c;
				if (a*a*a + b * b*b + c * c*c == x)
					cout << x << endl;
			}
	return 0;
}